/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.inject.Named;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Eric
 */
@Named("tInventory")
@Entity
@Table(name = "t_inventory")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TInventory.findAll", query = "SELECT t FROM TInventory t"),
    @NamedQuery(name = "TInventory.findById", query = "SELECT t FROM TInventory t WHERE t.id = :id"),
    @NamedQuery(name = "TInventory.findByUnitId", query = "SELECT t FROM TInventory t WHERE t.unitId = :unitId"),
    @NamedQuery(name = "TInventory.findByBrand", query = "SELECT t FROM TInventory t WHERE t.brand = :brand"),
    @NamedQuery(name = "TInventory.findBySeries", query = "SELECT t FROM TInventory t WHERE t.series = :series"),
    @NamedQuery(name = "TInventory.findByDotNumber", query = "SELECT t FROM TInventory t WHERE t.dotNumber = :dotNumber"),
    @NamedQuery(name = "TInventory.findByVendor", query = "SELECT t FROM TInventory t WHERE t.vendor = :vendor"),
    @NamedQuery(name = "TInventory.findByWheelPosition", query = "SELECT t FROM TInventory t WHERE t.wheelPosition = :wheelPosition"),
    @NamedQuery(name = "TInventory.findByPurchasePrice", query = "SELECT t FROM TInventory t WHERE t.purchasePrice = :purchasePrice"),
    @NamedQuery(name = "TInventory.findByOtherPrice", query = "SELECT t FROM TInventory t WHERE t.otherPrice = :otherPrice"),
    @NamedQuery(name = "TInventory.findByPoNumber", query = "SELECT t FROM TInventory t WHERE t.poNumber = :poNumber"),
    @NamedQuery(name = "TInventory.findByDecomm", query = "SELECT t FROM TInventory t WHERE t.decomm = :decomm"),
    @NamedQuery(name = "TInventory.findBySize1", query = "SELECT t FROM TInventory t WHERE t.size1 = :size1")})
public class TInventory implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Size(max = 255)
    @Column(name = "unit_id")
    private String unitId;
    @Size(max = 255)
    @Column(name = "brand")
    private String brand;
    @Size(max = 255)
    @Column(name = "series")
    private String series;
    @Size(max = 255)
    @Column(name = "dot_number")
    private String dotNumber;
    @Size(max = 255)
    @Column(name = "vendor")
    private String vendor;
    @Size(max = 200)
    @Column(name = "wheel_position")
    private String wheelPosition;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "purchase_price")
    private BigDecimal purchasePrice;
    @Column(name = "other_price")
    private BigDecimal otherPrice;
    @Size(max = 255)
    @Column(name = "po_number")
    private String poNumber;
    @Basic(optional = false)
    @NotNull
    @Column(name = "decomm")
    private boolean decomm;
    @Size(max = 255)
    @Column(name = "size1")
    private String size1;

    public TInventory() {
    }

    public TInventory(Integer id) {
        this.id = id;
    }

    public TInventory(Integer id, boolean decomm) {
        this.id = id;
        this.decomm = decomm;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUnitId() {
        return unitId;
    }

    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;
    }

    public String getDotNumber() {
        return dotNumber;
    }

    public void setDotNumber(String dotNumber) {
        this.dotNumber = dotNumber;
    }

    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    public String getWheelPosition() {
        return wheelPosition;
    }

    public void setWheelPosition(String wheelPosition) {
        this.wheelPosition = wheelPosition;
    }

    public BigDecimal getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public BigDecimal getOtherPrice() {
        return otherPrice;
    }

    public void setOtherPrice(BigDecimal otherPrice) {
        this.otherPrice = otherPrice;
    }

    public String getPoNumber() {
        return poNumber;
    }

    public void setPoNumber(String poNumber) {
        this.poNumber = poNumber;
    }

    public boolean getDecomm() {
        return decomm;
    }

    public void setDecomm(boolean decomm) {
        this.decomm = decomm;
    }

    public String getSize1() {
        return size1;
    }

    public void setSize1(String size1) {
        this.size1 = size1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TInventory)) {
            return false;
        }
        TInventory other = (TInventory) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.TInventory[ id=" + id + " ]";
    }
    
}
